<extend name="Shops:layout" />
<block name="content">

<script src="__PUBLIC__/plugins/kindeditor/kindeditor.js"></script>
<script src="__PUBLIC__/plugins/kindeditor/lang/zh_CN.js"></script>

<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/webuploader/style.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/webuploader/webuploader.css" />
<script type="text/javascript" src="__PUBLIC__/plugins/webuploader/webuploader.js"></script>
<script type="text/javascript" src="__JS__/goodsbatchupload.js"></script>
<!--时间日历插件-->
<script type="text/javascript" src="__PUBLIC__/plugins/jeDate/jedate.js"></script>
<style>
.datainp{ width:150px; }
</style>
<script>
$(function () {
	   $('#tab').TabPanel({tab:0});
	   $.formValidator.initConfig({
		   theme:'Default',mode:'AutoTip',formID:"myform",debug:true,submitOnce:true,
		   onSuccess:function(){
				  //
				  $.post('{:U('Goods/yunsetmoney',array('gid' => $shopinfo['id']))}',{
				  	money : $('#money').val(),
					yunjiage : $('#yunjiage').val()
				  },function(data){
				  	if(data['status']){
						WST.msg(data['msg'], {icon: 1},function(){
							window.location.href = '{$prev_url}';
						});
					}else{
						WST.msg(data['msg'], {icon: 5});
					}
				  });
				  
				  
			       return false;
			},onError:function(msg){
		}});
	   $("#money").formValidator({onShow:"",onFocus:"",onCorrect:"输入正确"}).inputValidator({min:1,max:50,onError:"请输入商品总价"});
	   $("#yunjiage").formValidator({onShow:"",onFocus:"",onCorrect:"输入正确"}).inputValidator({min:1,max:50,onError:"请输入单次价格"});
});

</script>
       <div class="wst-body"> 
       <div class='wst-page-header'>卖家中心 > 重置价格</div>
       <div class='wst-page-content'>
       <div id='tab' class="wst-tab-box">
		<ul class="wst-tab-nav">
	    	<li>商品信息</li>
	    </ul>
    	<div class="wst-tab-content" style='width:99%;margin-bottom: 10px;'>

    	<!-- 商品基础信息 -->
    	<div class='wst-tab-item' style="position: relative;">
			<!--表单提交部分-->
	       <form name="myform" method="post" id="myform" autocomplete="off">
	        <input type='hidden' id='id' value='{$shopinfo.id}'/>
	        <table class="wst-form">
	        	<tr>
	        		<td colspan="2" style="padding:10px;">
						<b>提示:</b>已经购买过的商品不能在修改，点击查看往期可以查看该商品的所有期数商品！<br /><b>提示:</b> 因为商品添加后抢购码已经生成成功,所以不能在本期内修改价格了. 
	        		</td>
	        	</tr>
				
	           <tr>
	             <th width='120'>商品标题<font color='red'>*</font>：</th>
	             <td><a href="javascript:;">第(<b style="color:#ff6000">{$shopinfo['qishu']}</b>)期{$shopinfo['title']}</a></td>
	           </tr>
	           <tr>
	           	<th width="120">商品单次售价：</th>
				<td><b style="color:#ff6000">{$shopinfo['yunjiage']}</b> 元</td>
	           </tr>
	           <tr>
	           	<th width="120">商品总售价：</th>
				<td><b style="color:#ff6000">{$shopinfo['money']}</b> 元</td>
	           </tr>
	           <tr>
	           	<th width="120">已参与人数：</th>
				<td><b style="color:#ff6000">{$shopinfo['canyurenshu']}</b> 人</td>
	           </tr>
	           <tr>
	           	<th width="120">总需要人数：</th>
				<td><b style="color:#ff6000">{$shopinfo['zongrenshu']}</b> 人
				&nbsp;&nbsp;
				向上取整（{$shopinfo['money']}/{$shopinfo['yunjiage']}）= {$shopinfo['zongrenshu']}
				
				</td>
	           </tr>
	           <tr>
	             <th width='120'>新商品总价<font color='red'>*</font>：</th>
	             <td>
	             <input type='text' id='money' name='money' class="form-control wst-ipt" value='{$object.money}' onkeypress="return WST.isNumberdoteKey(event)" onkeyup="javascript:WST.isChinese(this,1)" maxLength='10'/>
	             </td>
	           </tr>
	           <tr>
	             <th width='120'>新单次价格<font color='red'>*</font>：</th>
	             <td>
	             <input type='text' id='yunjiage' name='yunjiage' class="form-control wst-ipt" value='{$object.yunjiage|default=1}' onkeypress="return WST.isNumberdoteKey(event)" onkeyup="javascript:WST.isChinese(this,1)" maxLength='10'/>
	             </td>
	           </tr>
	           
	           <tr>
	             <td colspan='3' style='padding-left:320px;'>
	                 <button class='wst-btn-query' type="submit">保&nbsp;存</button>
	                 <if condition="$umark !='toEdit' ">
	                 <button class='wst-btn-query' type="button" onclick='javascript:location.href="__ROOT__/index.php/Home/Goods/yungoods"'>返&nbsp;回</button>
	                 </if>
	             </td>
	           </tr>
	        </table>
	        </form>
	      </div>
	
	      <!-- 相册 -->
	     

       </div>
       </div>
       
       </div>
       <div style='clear:both;'></div>
       </div>

</block>